package com.pig.live.common.exception;

/**
 * @author gaojx
 * @since 2020/8/16
 */
public class BaseException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 所属模块
     * dao common admin framework
     */
    private String module;

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误码参数
     */
    private Object[] args;

    /**
     * 错误消息
     */
    private String defaultMessage;

    public BaseException(String module, String code, Object[] args, String defaultMessage) {
        this.module = module;
        this.code = code;
        this.args = args;
        this.defaultMessage = defaultMessage;
    }

    public BaseException(String module, String code, Object[] args) {
        this.module = module;
        this.code = code;
        this.args = args;
    }

    public BaseException(String code, Object[] args) {
        this.code = code;
        this.args = args;
    }

    public BaseException(String defaultMessage) {

        this.defaultMessage = defaultMessage;
    }


}
